<!-- 面试练习 -->
<template>
    <div class="in">数据[{text:1}, {text:2}, {text:2}, {text:3}] <br>去重结果： {{ quchongRes }}</div>

    <div class="in">
        说明：从下面字符串种取出 ['www.baidu.com','www.sohu.com'] <br>
        字符串：{{ subject2Str }} <br>
        结果：{{regexpRes}}
    </div>
</template>

<script setup lang="ts">
    import { ref, reactive, onMounted } from "vue";

    import { res as quchong } from "@/assets/js/interview/subject1";
    import { res as regexp } from "@/assets/js/interview/subject2";
    // 数组去重结果
    let quchongRes = ref(quchong)
    // 正则从字符串中获取链接
    let subject2Str = ref(`< a href=' '></ a><div href='www.baidu.com'></div>< a href='www.sohu.com'></ a>< a href=''></ a>`)
    let regexpRes = ref(regexp)


    onMounted(()=>{  })
</script>
<style scoped lang="less">
    .in {
        width: 90%;
        margin: 0 auto;
        padding: 15px 10px;
        border: 1px solid rosybrown;
    }
</style>